home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1026 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: "john (j.d.) hickin" <hickin@bnr.ca>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: sample auto_ptr template
  5. Date: 10 Apr 1996 14:56:42 GMT
  6. Organization: Bell Northern Research
  7. Approved: clamage@eng.sun.com (comp.std.c++)
  8. Message-ID: <4kgc58$q5e@bmtlh10.bnr.ca>
  9. NNTP-Posting-Host: taumet.eng.sun.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset="us-ascii"
  12. Content-Transfer-Encoding: 7bit
  13. X-Nntp-Posting-Host: bmtlh520.bnr.ca 
  14. X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.05 9000/715) 
  15. X-Url: news:gregorDpFBCt.A5@netcom.com 
  16. X-Lines: 13
  17. Content-Length: 540
  18. Originator: clamage@taumet
  19.  
  20. |> What you can do is design your code so that you know who owns each object when.
  21. |> The auto_ptr template can help you implement such designs safely.  If you
  22. |> cannot design your code to work with auto_ptr you probably need garbage
  23. |> collection of some form.
  24.  
  25. I have no problem with this approach which is, in fact, forced on one by the
  26. sample implementation, because it is no longer possible to determine ownership
  27. through a member function.
  28.  
  29. -- 
  30. John Hickin      Nortel Technology, Montreal, Quebec
  31. (514) 765-7924   hickin@nortel.ca
  32.  
  33.  
  34.  
  35. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  36. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  37. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  38. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  39. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  40.